/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package gourmetgrossisten;

import interfaces.GourmetGrossistInterface;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;



public abstract class Gourmetklient {

    private static GourmetGrossistInterface gourmetGrossist;
    private static String host = "localhost";
    private static int port = 1099;
 


    public static GourmetGrossistInterface getMainStub() throws RemoteException, NotBoundException {

        Registry registry = LocateRegistry.getRegistry(host, port);
        gourmetGrossist = (GourmetGrossistInterface) registry.lookup("Gourmet");
        return gourmetGrossist;
    
    }
}
